package dreamdancetiktokenumsmysql

const (
	DanceComposeElementChangeLogChangeTypeAdd     = 1 //增加
	DanceComposeElementChangeLogChangeTypeReduced = 2 //减少

	DanceComposeElementChangeLogSourceDirectDrawPrize = 1 //抽奖活动直接获得
	DanceComposeElementChangeLogSourceOtherGiveChange = 2 //他人赠送获得
	DanceComposeElementChangeLogSourceGiveOtherChange = 3 //赠送他人减少
	DanceComposeElementChangeLogSourceRankDaySuit     = 4 //日榜套装发放
	DanceComposeElementChangeLogSourceRankDayWing     = 5 //日榜翅膀发放
	DanceComposeElementChangeLogSourceRankWeekSuit    = 6 //周榜双人套装获得
	DanceComposeElementChangeLogSourceAddSplinter     = 7 //补发添加
	DanceComposeElementChangeLogSourceCutSplinter     = 8 //补发减少
)

type DanceComposeElementChangeLogEnums struct {
}

var DanceComposeElementChangeLogEnumsObject DanceComposeElementChangeLogEnums

func (e DanceComposeElementChangeLogEnums) SourceType() []int {
	return []int{
		DanceComposeElementChangeLogSourceDirectDrawPrize,
		DanceComposeElementChangeLogSourceOtherGiveChange,
		DanceComposeElementChangeLogSourceGiveOtherChange,
		DanceComposeElementChangeLogSourceRankDaySuit,
		DanceComposeElementChangeLogSourceRankDayWing,
		DanceComposeElementChangeLogSourceRankWeekSuit,
		DanceComposeElementChangeLogSourceAddSplinter,
		DanceComposeElementChangeLogSourceCutSplinter,
	}
}

func (e DanceComposeElementChangeLogEnums) SourceMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.SourceType() {
		m[s] = e.SourceString(s)
	}
	return m
}

//// 获取来源 1:抽奖活动直接获得;2.他人赠送获得;3.赠送他人减少;4.日榜套装发放;5:日榜翅膀发放,6:周榜双人套装获得;7.补发添加;9.补发减少;

func (e DanceComposeElementChangeLogEnums) SourceString(tag int) string {
	switch tag {
	case DanceComposeElementChangeLogSourceDirectDrawPrize:
		return "抽奖活动直接获得"
	case DanceComposeElementChangeLogSourceOtherGiveChange:
		return "他人赠送获得"
	case DanceComposeElementChangeLogSourceGiveOtherChange:
		return "赠送他人减少"
	case DanceComposeElementChangeLogSourceRankDaySuit:
		return "日榜套装发放"
	case DanceComposeElementChangeLogSourceRankDayWing:
		return "日榜翅膀发放"
	case DanceComposeElementChangeLogSourceRankWeekSuit:
		return "周榜双人套装获得"
	case DanceComposeElementChangeLogSourceAddSplinter:
		return "补发添加"
	case DanceComposeElementChangeLogSourceCutSplinter:
		return "补发减少"
	default:
		return "其他"
	}
}

func (e DanceComposeElementChangeLogEnums) ChangeType() []int {
	return []int{
		DanceComposeElementChangeLogChangeTypeAdd,
		DanceComposeElementChangeLogChangeTypeReduced,
	}
}

func (e DanceComposeElementChangeLogEnums) ChangeTypeMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.ChangeType() {
		m[s] = e.ChangeTypeString(s)
	}
	return m
}

func (e DanceComposeElementChangeLogEnums) ChangeTypeString(tag int) string {
	switch tag {
	case DanceComposeElementChangeLogChangeTypeAdd:
		return "增加"
	case DanceComposeElementChangeLogChangeTypeReduced:
		return "减少"
	default:
		return "其他"
	}
}
